﻿using System;
using gbL.NetBoard.Examples.DoubleMVC.Controller;

namespace gbL.NetBoard.Examples.DoubleMVC
{
    class Program
    {
        static void Main(string[] args)
        {
            ObjectFactory factory = new ObjectFactory();
            Blackboard domain = factory.BuildDomain();

            ControllerDispatch dispatch = new ControllerDispatch(
                () => new BrowseController(domain).Default()
            );

            while (dispatch != null && dispatch.Target != null)
            {   
                dispatch = dispatch.Target.Compile()();
            }

            Console.WriteLine();
            Console.WriteLine("Finished. Press any key to continue...");
            Console.ReadKey(true);
        }
    }
}
